<template>
  <div id="app" style="height: 100%">
    <el-container style="height: 100%;">
      <el-aside style="width: 270px">
        <Vertical></Vertical>
      </el-aside>
      <el-main>
        <router-view/>
        <back-to-top :visibility-height="100" :back-position="0" transition-name="fade" ref="backTop"/>
      </el-main>
    </el-container>
  </div>

</template>

<script>

import BackToTop from '@/components/BackToTop'
import Vertical from "@/layout/ManageMenu";

export default {
  name: 'App',
  components: {
    BackToTop,
    Vertical
  },
  mounted() {
    window.addEventListener('hashchange', () => {
      var currentPath = window.location.hash.slice(1); // 获取输入的路由
      if (this.$router.path !== currentPath) {
        this.$router.push(currentPath); // 动态跳转
      }
    }, false);
  }
}
</script>
